//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package 力扣.题库.未分类;

public class demo_3392 {
    public demo_3392() {
    }

    public int countSubarrays(int[] nums) {
        int n = nums.length;
        int count = 0;

        for(int i = 2; i < n; ++i) {
            if ((double)(nums[i - 2] + nums[i]) == (double)nums[i - 1] / (double)2.0F) {
                ++count;
            }
        }

        return count;
    }
}
